package com.bwie.ticket.service.imp;

import com.bwie.common.domain.Order;
import com.bwie.common.domain.Ticket;
import com.bwie.common.result.Result;
import com.bwie.ticket.mapper.TicketMapper;
import com.bwie.ticket.service.TickerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TickerServiceImp implements TickerService {
    @Autowired
    private TicketMapper ticketMapper;
    @Override
    public List<Ticket> list() {
        List<Ticket> result=ticketMapper.list();
        return result;
    }

    @Override
    public Result add(Ticket ticket) {
        Integer add = ticketMapper.add(ticket);
        return Result.success(add);
    }

    @Override
    public List<Order> selectOrder() {
        List<Order> order = ticketMapper.selectOrder();
        return order;
    }
}
